package com.itheima.inputstream;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;

public class Demo03 {

    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("day12\\a.txt");
        byte[] bytes= new byte[1024];
        /*while (true) {
            int length = fis.read(bytes);
            if(length==-1){
                break;
            }
            System.out.println("读到了"+length+"个数据");
            System.out.println(Arrays.toString(bytes));
        }*/
        int len;
        while ((len=fis.read(bytes))!=-1){
            for (int i = 0; i < len; i++) {
                System.out.println(bytes[i]);
            }
        }
       fis.close();


    }
}
